<!-- App.vue -->
<template>
  <div id="app">
    输入标题：<input type="text" v-model="title">
    <!-- 传递数据到子组件 -->
    <my-title v-bind:title="title"></my-title>
  </div>
</template>

<script>
import MyTitle from './components/MyTitle.vue'

export default {
  name: 'App',
  components: {
    MyTitle  // 注册局部组件
  },
  data() {
    return {
      title: "111"
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* text-align: center; */
  color: #2c3e50;
  margin-top: 60px;
}
</style>